Repository navigation
Conversation
An index_entry_length below INDEX_ENTRY_HEADER_SIZE passed validate_size. The entry slice was then truncated below the header, so later header field accesses went out of bounds, and a length of zero kept the entry iterator from advancing. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NtfsIndexEntry::validate_sizechecks that the slice holds at least a header and thatindex_entry_lengthdoes not exceed the slice, but it accepts anindex_entry_lengthsmaller thanINDEX_ENTRY_HEADER_SIZE. On a corrupted volume this has two effects:Both were found by fuzzing a directory listing over a mutated NTFS image (cargo-fuzz / libFuzzer) with the released 0.4.0. The check in
masteris unchanged from 0.4.0, so this patch adds the lower bound there and returns the existingInvalidIndexEntrySizeerror.I have reproduced the two failures on 0.4.0 only. On
masterI checked that the patch builds and that the existing tests pass, but I have not run the fuzz inputs against it.🤖 Generated with Claude Code